<template>
    <div class='aa'>御剑乘风来,除魔天地间!====aa
        <div id="demo">
            <button v-on:click="show = !show">Toggle</button>
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~
            <com1 @c1toaa='aashow' :a1='a1Msg'></com1>
            <hr>
            <h1>-------{{fromcc}}------</h1>
           
        </div>


        <hr>
        <h1>这里是非父子组件传值</h1>
        <van-button @click='aabtn' type="danger">这里是非父子组件传值</van-button>
    </div>
</template>
           
<script>
import  bus  from  "@/assets/bus.js"
export default {
    data(){
        return {
            show: true,
            a1Msg:'我是aa组件中的值',
            fromcc:''
        }
    },
    methods:{
        aashow(message){
            console.log(message,1111);
            this.fromcc=message
            
        },

        /* 非父子 */
        aabtn(){
            bus.$emit('busevent',this.a1Msg)
        }
    }
};
</script>
<style scoped>

</style>